<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="d" uri="http://dgg.net/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>证书指导价配置</title>
    <%@ include file="../../header.jsp" %>
</head>
<body>
<div class="body-main">
    <div class="titleSearch">
        <div class="layui-inline">
            <label>所属月份：</label>
            <div class="layui-inline">
                <input type="text" name="startDate" placeholder="开始时间" class="Wdate input-style" id="startDate"
                       onfocus="var endDate=$dp.$('endDate'); WdatePicker({onpicked:function(){endDate.focus();}, maxDate:'#F{ $dp.$D(\'endDate\')}', dateFmt:'yyyy-MM'})">
            </div>
            <span>-</span>
            <div class="layui-inline">
                <input type="text" name="endDate" placeholder="结束时间" class="Wdate input-style" id="endDate"
                       onfocus="WdatePicker({minDate:'#F{$dp.$D(\'startDate\')}', dateFmt:'yyyy-MM'})">
            </div>
        </div>
        <d:hasUrlAuth authCode="ZZSC_ZS_SYB">
            <div class="layui-inline">
                <label>所属事业部：</label>
                <div class="layui-input-inline">
                    <select class="select-style" id="selectSignOrgName" name="selectSignOrgName">
                    </select>
                </div>
            </div>
        </d:hasUrlAuth>
        <div class="layui-inline">
            <label>证书类型：</label>
            <div class="layui-input-inline">
                <select class="select-style" name="certificateType" id="certificateType"
                        onchange="loadCertificateType('190px','#certificateType','${GENERAL_CREDENTIAL}',1,'#certificateSpecialty',0,'#certificateLevel')">
                    <option value="">请选择</option>
                </select>
            </div>
        </div>
        <div class="layui-inline">
            <label>证书专业：</label>
            <div class="layui-input-inline">
                <select class="select-style" name="certificateSpecialty" id="certificateSpecialty">
                    <option value="">请选择</option>
                </select>
            </div>
        </div>
        <div class="layui-inline">
            <label>证书等级：</label>
            <div class="layui-input-inline">
                <select class="select-style" name="certificateLevel" id="certificateLevel">
                    <option value="">请选择</option>
                </select>
            </div>
        </div>
        <div class="layui-inline">
            <label>地区：</label>
            <div class="layui-input-inline" id="certificateArea">
                <input type="hidden" name="certificateAreaId" id="certificateAreaId" class="plug-in-msg"/>
                <input type="hidden" name="certificateAreaCodes" id="certificateAreaCodes" class="plug-in-code"/>
                <input type="text" readonly placeholder="请选择" class="chose-plugIn layui-input">
                <div class="bus-picker">
                    <div class="bus-picker-tab">
                        <a href="javascript:void(0);" class="active">请选择</a>
                    </div>
                    <div class="bus-picker-content"></div>
                </div>
            </div>
        </div>
        <div class="layui-inline">
            <label>适用范围：</label>
            <div class="layui-input-inline">
                <select class="table-select" name="applicationScopes" id="applicationScopes">
                    <option value="">请选择</option>
                    <c:forEach var="p" items="${applicationScopes}">
                        <option value="${p.code}">${p.name}</option>
                    </c:forEach>
                </select>
            </div>
        </div>
        <div class="layui-inline">
            <button class="layui-btn layui-btn-mini layui-btn-normal" onclick="search('#myTable','reload')">搜索</button>
            <button class="layui-btn layui-btn-mini layui-btn-primary" onclick="cleanSearch()">清空</button>
            <button class="layui-btn layui-btn-mini layui-btn-green" onclick="exportGuidePrice()">导出</button>
        </div>
    </div>
    <div class="table-conter">
        <a href="javascript:void(0)" class="layui-btn layui-btn-mini" onclick="addPrice()">新增指导价</a>
        <a href="javascript:void(0)" class="layui-btn layui-btn-mini" onclick="copyPrice()">复制指导价</a>
    </div>

    <table id="myTable" class="cell-border crm-table">
    </table>
</div>

<div style="display: none;">
    <input id="GENERAL_CREDENTIAL" value="${GENERAL_CREDENTIAL}"/>
</div>
<!--新增指导价 弹窗 start-->
<div class="content-layer layui-layer-wrap" id="addPrice">
    <table class="add-table form-table">
        <tbody>
        <d:hasUrlAuth authCode="ZZSC_ZS_SYB">
            <tr>
                <th><span class="required">事业部：</span></th>
                <td>
                    <select id="signOrgName" name="signOrgName" autocomplete="off" class="select-style">
                        <option value="">请选择</option>
                    </select>
                </td>
            </tr>
        </d:hasUrlAuth>
        <tr>
            <th><span class="required">证书类型：</span></th>
            <td>
                <select name="addType" id="addType" autocomplete="off" class="select-style"
                        onchange="loadCertificateType('190px','#addType','${GENERAL_CREDENTIAL}',1,'#addMajo',0,'#addLevel')">
                    <option value="">请选择</option>
                </select>
            </td>
        </tr>
        <tr>
            <th><span class="required">证书专业：</span></th>
            <td>
                <select name="addMajo" id="addMajo" autocomplete="off" class="select-style">
                    <option value="">请选择</option>
                </select>
            </td>
        </tr>
        <tr>
            <th><span class="required">证书等级：</span></th>
            <td>
                <select name="addLevel" id="addLevel" autocomplete="off" class="select-style">
                    <option value="">请选择</option>
                </select>
            </td>
        </tr>
        <tr>
            <th><span class="required">地区：</span></th>
            <td>
                <div class="layui-input-inline" id="addArea">
                    <input type="hidden" name="addAreaAreaId" class="plug-in-msg"/>
                    <input type="hidden" name="addAreaCodes" class="plug-in-code"/>
                    <input type="text" readonly placeholder="请选择" autocomplete="off" class="chose-plugIn layui-input" style="width: 240px" name="areaNames">
                    <div class="bus-picker">
                        <div class="bus-picker-tab">
                            <a href="javascript:void(0);" class="active">请选择</a>
                        </div>
                        <div class="bus-picker-content"></div>
                    </div>
                </div>
            </td>
        </tr>
        <tr>
            <th><span class="required">适用范围：</span></th>
            <td>
                <select class="select-style" name="addScope" id="addScope" autocomplete="off">
                    <option value="1">请选择</option>
                    <c:forEach var="p" items="${applicationScopes}">
                        <option value="${p.code}">${p.name}</option>
                    </c:forEach>
                </select>
            </td>
        </tr>
        <tr>
            <th><span class="required">指导价格：</span></th>
            <td>
                <label class="input-unit">
                    <input type="text" id="addGuidingPrice" name="addGuidingPrice" autocomplete="off" class="input-style"
                           onkeyup="restrictInputLength(this,8)">
                    <span class="unit">元</span>
                </label>
            </td>
        </tr>
        </tbody>
    </table>
</div>
<!--新增指导价 弹窗 end-->

<!--复制指导价 弹窗 start-->
<div class="content-layer layui-layer-wrap" id="copyPrice">
    <table class="add-table form-table">
        <tbody>

        <d:hasUrlAuth authCode="ZZSC_ZS_SYB">
            <tr>
                <th>事业部：</th>
                <td>
                    <select id="copySignOrgName" name="copySignOrgName" class="select-style">
                        <option value="">请选择</option>
                    </select>
                </td>
            </tr>
        </d:hasUrlAuth>
        <tr>
            <th>复制月份：</th>
            <td>
                <label class="time-line-warp">
                    <input type="text" class="Wdate input-style" id="copyDate" name="copyDate" onfocus="WdatePicker({dateFmt:'yyyy-MM'})">
                </label>
            </td>
        </tr>
        </tbody>
    </table>
</div>
<!--复制指导价 弹窗 end-->

<%@ include file="../../footer.jsp" %>
<script src="../../../../static/js/zzsc/common/functionalTool.js?v=${version}"></script>
<script src="../../../../static/js/zzsc/common/verificationTool.js?v=%${version}"></script>
<script src="../../../../static/js/zzsc/credential/credentailCommon/credentailCommon.js?v=${version}"></script>
<script src="../../../../static/js/zzsc/guidePriceConfig/price_config_index.js?v=${version}"></script>
</body>
</html>